FROM ubuntu:18.04

ENV INSTALL_FLAG=--no-install-recommends


# ubuntu换源
RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && apt-get update
# 用于安装g++，make等工具
# 更新apt
RUN apt-get install software-properties-common -y \
    && apt-get update && apt-get upgrade

RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y \
    && add-apt-repository ppa:ondrej/pkg-gearman -y \
    && apt-get update

# ppa换源
RUN sed -i 's/http:\/\/ppa.launchpad.net/https:\/\/launchpad.proxy.ustclug.org/g' /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-bionic.list  \
    && sed -i 's/http:\/\/ppa.launchpad.net/https:\/\/launchpad.proxy.ustclug.org/g' /etc/apt/sources.list.d/ondrej-ubuntu-pkg-gearman-bionic.list \
    && apt update

# 关闭时区检测 
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install php7.2 -y

# 安装网络组件
RUN apt-get install -y tree net-tools wget ${INSTALL_FLAG}

# 安装c++
RUN apt-get install -y gcc-13 g++-13 ${INSTALL_FLAG} \
    && ln -s /usr/bin/gcc-13 /usr/bin/gcc && ln -s /usr/bin/g++-13 /usr/bin/g++

# 安装java
RUN apt-get install -y openjdk-8-jdk ${INSTALL_FLAG}

# 安装python2.7和python3.8
RUN apt-get install -y python2.7 python3.8 python3-pip python-pip python-dev build-essential ${INSTALL_FLAG}

# 安装Go环境
RUN wget https://golang.google.cn/dl/go1.21.3.linux-amd64.tar.gz \
    && tar -zxvf go1.21.3.linux-amd64.tar.gz -C /usr/lib
# 配置go环境变量
ENV GOROOT=/usr/lib/go        
ENV GOOS=linux
ENV PATH=$GOROOT/bin/:$GOPATH/bin/:$PATH
RUN go env -w GO111MODULE=on \
    && go env -w GOPROXY=https://goproxy.cn

# 安装c#
RUN apt-get install mono-complete -y 

# 安装lua5.3
RUN apt-get install lua5.3 -y 

# 安装mysqlclient用于连接mysql服务器
RUN apt-get install libmysqlclient-dev mysql-client -y

# 安装seccomp
RUN apt-get install libseccomp-dev



